
import sun.text.normalizer.UTF16;

import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;

//@WebServlet("/user/*")
public class MyServlet implements Servlet {


    @Override
    public void init(ServletConfig servletConfig) throws ServletException {

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }
    @Override
    public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
        this.getServletConfig().getServletContext();
        String username = request.getParameter("username");
        String password = request.getParameter("password");
//       response.setCharacterEncoding("utf-8");
//       response.setContentType("text/html");
        String s = username + "用户注册成功";
//        response.getOutputStream().write(s.getBytes());
//      response.getWriter().write(s);
        System.out.println("service方法");
    }


    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {
        System.out.println("sdestroy方法");
    }
}
